import 'element-plus/dist/index.css'
import '@/styles/icon/iconfont.css'
import '@/styles/login.scss'
import ElementPlus from 'element-plus'
import { createPinia } from 'pinia'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Avue from '@smallwei/avue';
import axios from './router/http'
import BaiduMap from 'vue-baidu-map-3x'
import '@smallwei/avue/lib/index.css';
import '@/styles/sidebar.scss';
import '@/styles/tags.scss';
import zhLocale from '@smallwei/avue/lib/locale/lang/zh'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import basicContainer from '@/components/basic-container/main.vue'
window.axios = axios;
router.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title;
    }
    next();
});
const app = createApp(App)
const pinia = createPinia()
app.component('basicContainer', basicContainer)
app.use(router)
app.use(ElementPlus,{locale: zhCn})
app.use(pinia)
app.use(BaiduMap,{ak: 'jK9oeu2UY9XgQPmF71JYJPqHZNv1cOlr'})
app.use(Avue, {
    axios,
    locale:zhLocale
})
app.mount('#app')
